package com.spring.aop.demo6;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

public class MyAroundAdvice implements MethodInterceptor {
    @Override
    public Object invoke(MethodInvocation methodInvocation) throws Throwable {
        // 这句用来执行目标方法
        System.out.println("环绕前增强 ==============");
        // 如果不执行目标方法就可以阻止方法继续执行
        Object obj = methodInvocation.proceed();
        System.out.println("环绕后增强 ==============");
        return null;
    }
}
